<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<!-- <script type="text/javascript">
var val;
function getCurrentFee(){
	alert("In getCurrentFee");
	 var xmlhttp;
		
		if (window.XMLHttpRequest)
		  {// code for IE7+, Firefox, Chrome, Opera, Safari
		  xmlhttp=new XMLHttpRequest();
		  }
		else
		  {// code for IE6, IE5
		  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		  }
		
		xmlhttp.onreadystatechange=function()
		  {
			//document.getElementById("namediv").innerHTML="";
		  if (xmlhttp.readyState==4 && xmlhttp.status==200)
		    {
		    document.getElementById("currentfee").innerHTML=xmlhttp.responseText;
		    val=xmlhttp.responseText();
		    alert(val);
		    }
		  
		  if (xmlhttp.status==500)
		    {
		   alert("ERROR");
		    }
		  }
		xmlhttp.open("POST","currentfee.html",true);
		// document.getElementById("currentfee").innerHTML="";
		xmlhttp.send();
}

</script> -->
<script type="text/javascript">

function getCurrentFee(){
	 var xmlhttp;
	 	alert("Gauri");
		if (window.XMLHttpRequest)
		  {// code for IE7+, Firefox, Chrome, Opera, Safari
		  xmlhttp=new XMLHttpRequest();
		  }
		else
		  {// code for IE6, IE5
		  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		  }
		
		xmlhttp.onreadystatechange=function()
		  {
			//document.getElementById("namediv").innerHTML="";
		  if (xmlhttp.readyState==4 && xmlhttp.status==200)
		    {
			 document.getElementById("questiondiv").innerHTML=xmlhttp.responseText;
		    }
		  
		  if (xmlhttp.status==500)
		    {
		   alert("ERROR");
		    }
		  }
		xmlhttp.open("GET","currentfee.html",true);
		// document.getElementById("namediv").innerHTML="";
		xmlhttp.send();
	 
}
</script>

</head>
<body onload="getCurrentFee();">
	<form name="update" action="updatefee.htm" method="post">
		<fieldset>
			<legend>UPDATE TRANSACTION FEES</legend>
			<table class="main_table">
				<tr>
					<td>Current transaction fee:</td>
					<td>Rs. <!-- <span id="currentfee"> -->
					<%
					if(session.getAttribute("cvalue")!=null){
						String val=(String)session.getAttribute("cvalue").toString();
						if(val!=null){
					%>
					 <label id="currentfee"><%= val %></label> <!--  <input class="text_style" type="text" name="currentfee" id="currentfee"  readOnly>
					</span> -->
					<%} else{ %>
					<% System.out.println("null");}}%></td>
				</tr>
				<tr>
					<td>New transaction fee:</td>
					<td><input class="text_style" type="text" name="newfee" id="newfee"></td>
				</tr>
				<tr>
					<td><input type="submit" value="Save"></td>
					<td><input type="reset" value="Cancel"></td>
				</tr>
			
			</table>
			<% if( request.getParameter("msg")!=null && request.getParameter("msg").equals("ok")){ %>
					<span id="msgt">Fee updated successfully</span>
					<% } 
				if(request.getParameter("msg")!=null && request.getParameter("msg").equals("no")){
				%>
				<span id="msgf">Error in updated</span>
				<%}	%>
		</fieldset>
	</form>

</body>
</html>